<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<script type="text/javascript" src="../js/jquery-1.8.3.js"></script>
		<script type="text/javascript" src="../js/easyui/jquery.easyui.min.js"></script>
		<script type="text/javascript" src="../js/easyui/locale/easyui-lang-zh_CN.js"></script>
		<script type="text/javascript" src="../js/ztree/jquery.ztree.all-3.5.js" charset="UTF-8"></script>
		<link rel="stylesheet" href="../js/easyui/themes/default/easyui.css" />
		<link rel="stylesheet" href="../js/easyui/themes/icon.css" />
		<link rel="stylesheet" href="../js/ztree/zTreeStyle.css" />
		<script type="text/javascript">
			$(function() {
				var setting = {
					data: {
						simpleData: {
							enable: true
						}
					},
					callback: {
						onClick: function(event, treeId, treeNode, clickFlag) {
							var content = "<div style='height: 100%; width: 100%;overflow: hidden;'><iframe scrolling='auto' src='" + treeNode.page + "' style='width: 100%;height: 100%;border: 0;'></iframe></div>";
							if(treeNode.page!=undefined&&treeNode.page!=""){
								if($("#tabs").tabs('exists',treeNode.name)){
									$("#tabs").tabs('select',treeNode.name);
								}else{
									$("#tabs").tabs('add',{
										title:treeNode.name,
										content:content,
										closable:true
									});
								}
							}
						}
					}
				};
				var treeNode = [{
						id: 1,
						pId: 0,
						name: "父节点一"
					},
					{
						id: 2,
						pId: 0,
						name: "父节点二"
					},
					{
						id: 11,
						pId: 1,
						name: "百度",
						page: "http://www.baidu.com"
					},
					{
						id: 12,
						pId: 1,
						name: "github",
						page:"https://github.com/"
						
					},
					{
						id: 21,
						pId: 2,
						name: "子节点二一"
					},
					{
						id: 22,
						pId: 2,
						name: "子节点二二"
					}
				];
				$.fn.zTree.init(
					$("#baseMenu"),
					setting,
					treeNode
				);
			});
		</script>
	</head>

	<body class="easyui-layout">

		<div data-options="region:'north', title:'传智管理系统' " style="height: 100px;"></div>
		<div data-options="region:'west',title:'菜单导航'" style="width: 180px;">
			<div class="easyui-accordion" data-options="fit:true">
				<div data-options="title:'基础菜单'">
					<ul class="ztree" id="baseMenu"></ul>
				</div>
				<div data-options="title:'系统菜单'">菜单二</div>
			</div>
		</div>
		<div data-options="region:'center'">
			<div id="tabs" class="easyui-tabs" data-options="fit:true,closable:'true'">
			</div>
		</div>
		<div data-options="region:'east'" style="width: 100px;">东部区域</div>

	</body>

</html>